package com.lorenzogao.pley.ui.adapter

import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v4.app.FragmentPagerAdapter
import java.util.*

/**
 * 作者：Lorenzo Gao
 * Date: 2017/12/28
 * Time: 16:32
 * 邮箱：2508719070@qq.com
 * Description:
 */
class GuideFragmentAdapter(fm: FragmentManager) : FragmentPagerAdapter(fm) {


     private lateinit var mFragment: List<Fragment>


    fun setFragment(framgnet: List<Fragment>) {
        if (framgnet==null){
            mFragment=ArrayList()
        }
        else
        this.mFragment= framgnet

    }

    override fun getItem(position: Int): Fragment {
        return mFragment[position]
    }

    override fun getCount(): Int {
        return mFragment.size
    }

}